<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="jsonview/jquery.jsonview.css">
</head>
<body>
<table>
    <div id="json"></div>
    <script type="text/html" id="hardwareTemp">
        {{each}}

        {{/each}}
    </script>
    <video src="video/5ddcddcd-b0b7-43e6-aa27-f89031980681.ts" autoplay></video>
    <tr>
        <td></td>
        <td></td>
    </tr>
</table>
<script src="js/jquery-2.1.1.js"></script>
<script src="../js/template-web.js"></script>
<script src="jsonview/jquery.jsonview.js"></script>
<script>
    var nativeObject = {};
    var hardware = {};
    hardware.test = {
        test: 'test'
    }
    hardware.testString = '343434';
    if (typeof MediaPlayer === 'object') {
    }
    hardware.appCodeName = navigator.appCodeName;
    hardware.appName = navigator.appName;
    hardware.appVersion = navigator.appVersion;
    hardware.userAgent = navigator.userAgent;
    if (typeof HardwareInfo === 'object') {
        hardware.flashSize = HardwareInfo.Flash.size;
        hardware.RAMSize = HardwareInfo.RAM.size;
        hardware.RAMType = HardwareInfo.RAM.type;
        hardware.SOCModel = HardwareInfo.SOC.model;
        hardware.SOCFrequency = HardwareInfo.SOC.frequency;
        hardware.SOCProvider = HardwareInfo.SOC.provider;
        hardware.HWVersion = HardwareInfo.HW.version;
        hardware.STBTPtype = HardwareInfo.STB.TPtype;
        hardware.STBDefinition = HardwareInfo.STB.definition;
        hardware.STBProvider = HardwareInfo.STB.provider;
        hardware.STBBrand = HardwareInfo.STB.brand;
        hardware.STBModel = HardwareInfo.STB.model;
        hardware.STBSerialnumber = HardwareInfo.STB.serialnumber;
    }
    if (typeof SoftwareInfo === 'object') {
        hardware.OSName = SoftwareInfo.OS.name;
        hardware.OSVersion = SoftwareInfo.OS.version;
        hardware.OSProvider = SoftwareInfo.OS.provider;
        hardware.middlewareName = SoftwareInfo.middleware.name;
        hardware.middlewareVersion = SoftwareInfo.middleware.version;
        hardware.middlewareProvider = SoftwareInfo.middleware.provider;
        hardware.middlewareReleaseDate = SoftwareInfo.middleware.releaseDate;
        hardware.middlewareCopyright = SoftwareInfo.middleware.copyright;
        hardware.middlewareRAMSize = SoftwareInfo.middleware.RAMSize;
        hardware.middlewareNVMSize = SoftwareInfo.middleware.NVMSize;
        hardware.middlewarePlatformProfile = SoftwareInfo.middleware.platform_profile;
        hardware.loaderName = SoftwareInfo.loader.name;
        hardware.loaderVersion = SoftwareInfo.loader.version;
        hardware.loaderProvider = SoftwareInfo.loader.provider;
        hardware.loaderSize = SoftwareInfo.loader.size;
        hardware.CAName = SoftwareInfo.CA.name;
        hardware.CAVersion = SoftwareInfo.CA.version;
        hardware.CAProvider = SoftwareInfo.CA.provider;
        hardware.DriverVision = SoftwareInfo.Driver.vision;
    }
    if (typeof CAManager === 'object') {
        //获取智能卡卡号
        hardware.cardSerialNumber = CAManager.cardSerialNumber;
        hardware.caSystemIDs = CAManager.caSystemIDs;
        hardware.operators = CAManager.operators;
    }
    if (typeof Broadband === 'object') {
        var ethernetArray = Broadband.getAllEthernets();
        for (var i = 0; i < ethernetArray.length; i++) {
            var ethernet = ethernetArray[i];
            hardware.MACAddress = ethernet.MACAddress;
            hardware.IPs = ethernet.IPs;
            hardware.enableFlag = ethernet.enableFlag;
            hardware.description = ethernet.description;
            hardware.currentConnectionType = ethernet.currentConnectionType;
        }
    }

    $('#json').JSONView(hardware)

</script>
</body>
</html>